package com.mingqijia.gassafety.shared.cqrs;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Min;
import java.io.Serializable;

/**
 * 分页请求参数
 * @author Damon S.
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "分页请求参数")
public class PageableReq extends AuthoritySupportReq implements Serializable {

    @ApiModelProperty(value = "页码")
    @Min(value = 1, message = "index必须大于等于1")
    private Long page;

    @ApiModelProperty(value = "每页数量")
    @Min(value = 10, message = "limit必须大于等于10")
    private Long pageSize;
}
